package org.nf.trading.dao;


import org.apache.ibatis.annotations.Param;
import org.nf.trading.entity.User;

import java.util.List;

public interface UserMapper {
    /**
     * 通过用户id查询用户
     * @param uid
     * @return
     */
    User getUserId(Integer uid);
    /**
     * 通过手机号查询是否有这个用户
     * @param phone
     * @return
     */
    User getUserByPhone(@Param("phone") String phone);

    int deleteByPrimaryKey(Integer uId);

    int insert(User record);

    User selectByPrimaryKey(Integer uId);

    List<User> selectAll(@Param("pageNum") Integer pageNum,@Param("pageSize") Integer pageSize,@Param("userName") String userName,@Param("phone") String phone);

    int updateByPrimaryKey(User record);

    void addUser(User user);

    // 重置密码
    void updatePwd(Integer uid);

    void updateUser(User user);
}